/*
 * GNU GENERAL PUBLIC LICENSE v2
 * 
 * Developers: Alan Audette, Oguz Bastemur
 */
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace SqlDatabaseBackup.Configuration
{
    public class Backup : ConfigurationElement
    {
        [ConfigurationProperty("path")]
        public string Path
        {
            get 
            { 
                string path = this["path"].ToString().Trim();
                if (!path.EndsWith("\\"))
                    path += "\\";

                return path;
            }
        }

        [ConfigurationProperty("createNotExist")]
        public bool CreateNotExist
        {
            get
            {
                bool createNotExist = false;
                bool.TryParse(this["createNotExist"].ToString(), out createNotExist);
                return createNotExist;
            }
        }
    }
}
